package system

import (
	"time"
)

type UserRole struct {
	ID         uint64    `gorm:"primaryKey;autoIncrement;comment:'id'" json:"id"`
	Username   string    `gorm:"type:varchar(60);not null;comment:'用户名';index:idx_username" json:"username"`
	Role       string    `gorm:"type:varchar(60);not null;comment:'角色'" json:"role"`
	CreateTime time.Time `gorm:"type:datetime;not null;default:CURRENT_TIMESTAMP;comment:'创建时间'" json:"create_time"`
}

func (UserRole) TableName() string {
	return "t_user_role"
}
